import request from '/@/utils/request';

const server_url = import.meta.env.VITE_SERVER_URL as string;
const dragdesign_api = '/api-dragdesign';

/**
 * 获取WEB终端管理列表
 * @param params 
 */
export function getWebTerminalList(params?: object){
    return request({
        url: dragdesign_api + '/terminal/list',
        method: 'get',
        params: params
    })
}

/**
 * 获取WEB终端
 * @param params 
 */
export function getWebTerminal(params?: object){
    return request({
        url: dragdesign_api + '/terminal/info',
        method: 'get',
        params: params
    })
}

/** 新增WEB终端 */
export function addWebTerminal(params? : object){
	return server_url + dragdesign_api + '/terminal/add';
    // return request({
    //     url: dragdesign_api + '/terminal/add',
    //     method: 'post',
    //     data: params
    // });
}

/** 修改WEB终端 */
export function editWebTerminal(params?: object) {
	return server_url + dragdesign_api + '/terminal/edit';
    // return request({
    //     url: dragdesign_api + '/terminal/edit',
    //     method: 'post',
    //     data: params
    // });
}

/** 删除WEB终端 */
export function delWebTerminal(params?: object){
    return request({
        url: dragdesign_api + '/terminal/remove',
        method: 'post',
        data: params
    });
}
